/*jslint browser: true, devel: true, bitwise: true, white: true, plusplus: true, nomen:true */
/*global $:true, define:true */

/**
 * @module UI
 */

define(['WID/UI/Widget'],function(Widget) {
"use strict";

/** 
 * Push button.
 * @class Button
 * @constructor
 * @param {Object} props Paremeters. Zobacz też dostępne w {{#crossLink "Widget"}}{{/crossLink}}
 *  @param {String} props.caption Content for button.
 */
function Button(props) {
	props = props||{};
	Widget.call(this,props,'input');
	this.ntv.type = 'button';
	
	this.caption = props.caption||'';
	
} var extend = Object.create(Widget.prototype); extend.constructor = Button;

Widget.defineProps(extend,{
	caption: {
		get: function() {
			return this.ntv.value;
		},
		set: function(caption) {
			this.ntv.value = caption;
		}
	}
});

Button.prototype = extend;
return Button;
});
